hcf of numbers

83

hcf of numbers -

def hcf(num1,num2):
    if num2==0:
        return num1
    else:
        return hcf(num2, num1%num2)

res = hcf(num1, num2)    
print('The highest common factor is', res)

Comments

Submit
0 Comments